﻿
using System;
namespace AiAsteriods.Game.Entities.Agent {
  struct Pos {
    public int x;
    public int y;

    public int r { get { return y; } set { y = value; } }
    public int c { get { return x; } set { x = value; } }

    public float rad {
      get {
        return (float)Math.Sqrt(Math.Pow(x, 2) + Math.Pow(y, 2));
      }
    }
    public float theta {
      get {
        return (float)Math.Atan(y / x);
      }
    }

    public Pos(int x, int y) {
      this.x = x;
      this.y = y;
    }

    public float DistTo(Pos p) {
      return (float)Math.Sqrt(Math.Pow(p.x - x, 2) + Math.Pow(p.y - y, 2));
    }
  }
}
